/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.cms.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.common.utils.StringUtils;
import com.thinkgem.jeesite.modules.cms.entity.UserGroup;
import com.thinkgem.jeesite.modules.cms.dao.UserGroupDao;

/**
 * 用户和员工的对应Service
 * @author leo
 * @version 2017-02-14
 */
@Service
@Transactional(readOnly = true)
public class UserGroupService extends CrudService<UserGroupDao, UserGroup> {

	
	public UserGroup get(String id) {
		return super.get(id);
	}
	
	public List<UserGroup> findList(UserGroup userGroup) {
		return super.findList(userGroup);
	}
	
	public Page<UserGroup> findPage(Page<UserGroup> page, UserGroup userGroup) {
		return super.findPage(page, userGroup);
	}
	
	@Transactional(readOnly = false)
	public void save(UserGroup userGroup) {
		if (StringUtils.isBlank(userGroup.getId())) {
			userGroup.setIsNewRecord(true);
		}
		super.save(userGroup);
	}
	
	@Transactional(readOnly = false)
	public void delete(UserGroup userGroup) {
		super.delete(userGroup);
	}
	
}